package kidsWithCandies;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Solution {
    public List<Boolean> kidsWithCandies(int[] candies, int extraCandies) {
        List<Boolean> ans = new ArrayList<>();
        // 找到糖果最多的孩子
        int max =candies[0];
        for (int i = 1; i < candies.length; i++) {
            max = Math.max(max,candies[i]);
        }
        for (int i = 0; i < candies.length; i++) {
            ans.add(candies[i]+extraCandies>=max);
        }
        return ans;

    }
}
